/* ExcleInHeadToDB.java
 *
 * Project/Product: GW
 *
 * Modify Information:
 * =============================================================================
 *   Author	Date       Description
 *   ----------	---------- ---------------------------------------------------
 *   Administrator	2008-2-22	First release
 *
 * Licensed Materials - Property of APEP
 * =============================================================================
 *    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2008
 *    All Rights Reserved.
 *
 *    This software is the confidential and proprietary information of
 *    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
 *    You shall not disclose such Confidential Information and shall use it only
 *    in accordance with the terms of the license agreement you entered into 
 *    with Shanghai Auto Mart E-Procurement Co., Ltd.
 *
 * Noties:
 * =============================================================================
 * 
 */

package system.imp;
import java.io.DataInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.DecimalFormat;
import java.util.ArrayList;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;

import system.base.ClientDownupfileInfo;
import system.base.InHead;
import system.base.ServerDownupfileInfo;
import system.base.WarehouseCategory;
import framework.core.Conditions;
import framework.core.ConstDefine;
import framework.core.DBConnection;
import framework.core.ILoginContext;
import framework.core.LogWriter;
import framework.core.ObjectList;


public class ExcelInHeadToDB implements GWBaseProcesser {
    public static String doSaveToDB(DataInputStream aFile, DBConnection con, ILoginContext loginContext, String tableName, String warehouseCode,String upDownType)
    throws GWException
{
int tSuccCount = 0;
int tFailCount = 0;
String tFailFile = "0";
HSSFWorkbook tHSSFWorkbook = new HSSFWorkbook();
/*int number = tHSSFWorkbook.getNumberOfNames();
for(int i = 0;i<number;i++){
tableName = tHSSFWorkbook.getSheetAt(i).toString();
}
*/
// 开始读取excel文件
HSSFSheet tHSSFSheet = null;
try {
    tHSSFWorkbook = new HSSFWorkbook(aFile);
    tHSSFSheet = tHSSFWorkbook.getSheet(tableName);
    
} catch (IOException e) {
    e.getStackTrace();
    new Exception("批量下载文件失败");
}
ArrayList alist = new ArrayList();
ArrayList tsucceslist = new ArrayList();
ArrayList tErrList = new ArrayList();

// 读取并检查Excel明细
int tRowCount = parseExcelInHead(alist, tHSSFSheet, loginContext);
//int tRowCount = parseExcelInHead(alist,tHSSFSheet);
if (alist.size() > 0) {
    // 保存上传文件到数据库
    for (int i = 0; i < alist.size(); i++) {
        try {
            GWManufactureUploadVO gwManufactureUpload = (GWManufactureUploadVO) alist.get(i);

            InHead ih = gwManufactureUpload.getInHead();

            // 判断数据库中是否存在该条记录
            // 根据仓库编码和分类编码得到是否在数据库中存在该条信息
            /*
             * Conditions cs = new Conditions();
             * cs.add(WarehouseCategory.WAREHOUSE_CODE,wc.getWarehouseCode());
             * cs.add(WarehouseCategory.CATEGORY_CODE,wc.getCategoryCode());
             * WarehouseCategory warehouseCategory =
             * WarehouseCategory.fetch(con,cs);
             */

            InHead inHead = InHead.fetch(con, ih.getId());
            if (inHead == null) {
                // 数据库中不存在的操作:得到ID = GUID值
                inHead = InHead.fetch();
            }

            // 更新当前一条Excel信息数据库
            inHead.setInBillCode(ih.getInBillCode());
            inHead.setWarehouseCode(ih.getWarehouseCode());
            inHead.setWarehouseName(ih.getWarehouseName());
            inHead.setProviderCode(ih.getProviderCode());
            inHead.setProviderName(ih.getProviderName());
            inHead.setOtherWarehouseCode(ih.getOtherWarehouseCode());
            inHead.setWarehouseName(ih.getWarehouseName());
            inHead.setInTime(ih.getInTime());
            inHead.setInType(ih.getInType());
            inHead.setInMoney(ih.getInMoney());
            inHead.setSendBillCode(ih.getSendBillCode());
            inHead.setRemark(ih.getRemark());
            inHead.setBalanceFlag(ih.getBalanceFlag());
            inHead.setBalanceUserId(ih.getBalanceUserId());
            inHead.setBalanceUser(ih.getBalanceUser());
            inHead.setBalanceTime(ih.getBalanceTime());
            inHead.setStatus(ih.getStatus());
            inHead.setCreateUserId(ih.getCreateUserId());
            inHead.setCreateUser(ih.getCreateUser());
            inHead.setCreateTime(ih.getCreateTime());
            inHead.setLastUpdateUserId(ih.getLastUpdateUserId());
            inHead.setLastUpdateUser(ih.getLastUpdateUser());
            inHead.setLastUpdateTime(ih.getLastUpdateTime());
            inHead.setIsSync(ih.getIsSync());
            inHead.save(con);
            tSuccCount++;
        } catch (Exception e) {
            System.out.println(e.getMessage());
            tFailCount++;
        }
    }
                
    // 在循环结束后在客户上传下载表中记录操作信息
    try {
        ServerDownupfileInfo serverDownupfileInfo = new ServerDownupfileInfo();
        ServerDownupfileInfo sdfi = ServerDownupfileInfo.fetch();
        sdfi.setCreateTime(new framework.core.DateUtil().getFullString());
        sdfi.setCreateUser(ConstDefine.EXCELFILE_CREATE_USER_AUTO);
        sdfi.setCreateUserId(ConstDefine.EXCELFILE_CREATE_USER_ID_AUTO);
        sdfi.setDownloadtyp(upDownType);
        sdfi.setLastUpdateTime(new framework.core.DateUtil().getDateString());
        sdfi.setLastUpdateUser(loginContext.getLoginUserName());
        sdfi.setLastUpdateUserId(loginContext.getLoginUserId());
        sdfi.setParmsstr(tableName);
        sdfi.setDatatableName(tableName);
        sdfi.setParmstype(ServerDownupfileInfo.UPLOAD_PARMSTYPE_TEXT);
        sdfi.setStatus(ConstDefine.STR_YES);
        sdfi.setUpdownState(ServerDownupfileInfo.UPLOAD_STATE_SUCCESS);
        sdfi.setWarehouseUincode(warehouseCode);
        sdfi.save(con);
    } catch (Exception e) {
        System.out.println(e.getMessage());    
    }

}
// 读取sheet表单
return tSuccCount + "-" + tFailCount + "-" + tRowCount;
}

// end chengbiao.he

/* start chengbiao.he */
// 解析Excel文件
private static int parseExcelInHead(ArrayList aList, HSSFSheet aHSSFSheet, ILoginContext loginContext) throws GWException {
//  private static int parseExcelInHead(ArrayList aList,HSSFSheet aHSSFSheet)throws GWException {
int i = 0;
// 取得第一行的对象
HSSFRow tFirstRow = aHSSFSheet.getRow(0);

DecimalFormat a = new DecimalFormat("#");
while (true) {
    HSSFRow tHSSFRow = aHSSFSheet.getRow(1 + i);
    boolean flag = false;
    try {

        for (int j = 0; j < 25; j++) {
            if (tHSSFRow == null) {
                break;
            }
            if (tHSSFRow.getCell((short) j) == null) {
                break;
            }
            flag = true;
            break;
        }
        if (!flag) {
            break;
        } else {
            GWManufactureUploadVO tGSManufactureUploadVO = new GWManufactureUploadVO();
            int tResult = 1;
            String tFailReason = "";

            InHead ih = new InHead();

            for (int j = 0; j <25; j++) {
                // 获得EXCEL首行记录
                String tFiledName = tFirstRow.getCell((short) j).getStringCellValue();
                // 序号
                if (tFiledName.equalsIgnoreCase(InHead.ID)) {
                    String tID = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    ih.setId(tID);
                }
                // 入库单编码
                else if (tFiledName.equalsIgnoreCase(InHead.IN_BILL_CODE)) {
                    String tInBillCode = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setInBillCode(tInBillCode);
                }
                // 仓库编码
                else if (tFiledName.equalsIgnoreCase(InHead.WAREHOUSE_CODE)) {
                    String tWarehouseCode = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setWarehouseCode(tWarehouseCode);
                }
                // 仓库名称
                else if (tFiledName.equalsIgnoreCase(InHead.WAREHOUSE_NAME)) {
                    //int tWarehouseName = tHSSFRow.getCell((short)j).getCellType();
                    String tWarehouseName = PoiUtil.getCellValue(tHSSFRow, j, "");
                    ih.setWarehouseName(tWarehouseName);

                }
                // 供应商编码
                else if (tFiledName.equalsIgnoreCase(InHead.PROVIDER_CODE)) {
                    String tProviderCode = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    ih.setProviderCode(tProviderCode);
                }
                // 供应商名称
                else if (tFiledName.equalsIgnoreCase(InHead.PROVIDER_NAME)) {
                    String tProviderName = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setProviderName(tProviderName);

                }
                // 对方仓库编码
                else if (tFiledName.equalsIgnoreCase(InHead.OTHER_WAREHOUSE_CODE)) {
                    String tOtherWarehouseCode = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setOtherWarehouseCode(tOtherWarehouseCode);
                }

                // 对方仓库名称
                else if (tFiledName.equalsIgnoreCase(InHead.OTHER_WAREHOUSE_NAME)) {
                    String tWarehouseName = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getNumericCellValue());
                    ih.setWarehouseName(tWarehouseName);
                }
                // 入库时间
                else if (tFiledName.equalsIgnoreCase(InHead.IN_TIME)) {
                    String tInTime = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setInTime(tInTime);
                }
                // 入库类型
                else if (tFiledName.equalsIgnoreCase(InHead.IN_TYPE)) {
                    String tInType = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setInType(tInType);
                }
                // 入库金额
                else if (tFiledName.equalsIgnoreCase(InHead.IN_MONEY)) {
                    //String tInMoney = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    int tInMoney = tHSSFRow.getCell((short)j).getCellType();
                    ih.setInMoney(tInMoney);
                }
                // 送货单号
                else if (tFiledName.equalsIgnoreCase(InHead.SEND_BILL_CODE)) {
                    String tSendBillCode = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setSendBillCode(tSendBillCode);
                }
                // 备注
                if (tFiledName.equalsIgnoreCase(InHead.REMARK)) {
                    String tRemark = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    ih.setRemark(tRemark);
                }
                // 结算标志
                else if (tFiledName.equalsIgnoreCase(InHead.BALANCE_FLAG)) {
                    String tBalanceFlag = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setBalanceFlag(tBalanceFlag);
                }
                // 结算人ID
                else if (tFiledName.equalsIgnoreCase(InHead.BALANCE_USER_ID)) {
                    String tBalanceUserId = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setBalanceUserId(tBalanceUserId);
                }
                // 结算人姓名
                else if (tFiledName.equalsIgnoreCase(InHead.BALANCE_USER)) {
                    //int tBalanceUser = tHSSFRow.getCell((short)j).getCellType();
                    String tBalanceUser = PoiUtil.getCellValue(tHSSFRow, j, "");
                    ih.setBalanceUser(tBalanceUser);

                }
                // 结算时间
                else if (tFiledName.equalsIgnoreCase(InHead.BALANCE_TIME)) {
                    String tBalanceTime = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getStringCellValue());
                    ih.setBalanceTime(tBalanceTime);
                }
                // 是否有效
                else if (tFiledName.equalsIgnoreCase(InHead.STATUS)) {
                    String tStatus = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setStatus(tStatus);

                }
                // 创建用户ID
                else if (tFiledName.equalsIgnoreCase(InHead.CREATE_USER_ID)) {
                    String tCreateUserId = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setCreateUserId(tCreateUserId);
                }

                // 创建用户
                else if (tFiledName.equalsIgnoreCase(InHead.CREATE_USER)) {
                    String tCreateUser = PoiUtil.getCellValue(tHSSFRow, j, "");// String.valueOf(tHSSFRow.getCell((short)j).getNumericCellValue());
                    ih.setCreateUser(tCreateUser);
                }
                // 单证创建时间
                else if (tFiledName.equalsIgnoreCase(InHead.CREATE_TIME)) {
                    String tCreateTime = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setCreateTime(tCreateTime);
                }
                // 最后修改人序号
                else if (tFiledName.equalsIgnoreCase(InHead.LAST_UPDATE_USER_ID)) {
                    String tLastUpdateUserId = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setLastUpdateUserId(tLastUpdateUserId);
                }
                // 最后修改人
                else if (tFiledName.equalsIgnoreCase(InHead.LAST_UPDATE_USER)) {
                    String tLastUpdateUser = PoiUtil.getCellValue(tHSSFRow, j, ""); // tHSSFRow.getCell((short)j).getStringCellValue().trim();
                    ih.setLastUpdateUser(tLastUpdateUser);
                }
                // 最后修改时间
                else if (tFiledName.equalsIgnoreCase(InHead.LAST_UPDATE_TIME)) {
                    String tLastUpdateTime = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setLastUpdateTime(tLastUpdateTime);
                }
             // 是否已同步
                else if (tFiledName.equalsIgnoreCase(InHead.IS_SYNC)) {
                    String IsSync = PoiUtil.getCellValue(tHSSFRow, j, "");// tHSSFRow.getCell((short)j).getStringCellValue();
                    ih.setIsSync(IsSync);
                }
                

            }
            tGSManufactureUploadVO.setInHead(ih);
            // tGSManufactureUploadVO.setFailure_reason(tFailReason);
            tGSManufactureUploadVO.setInsert_result(String.valueOf(tResult));
            tGSManufactureUploadVO.setRowNumber(i + 1);
            aList.add(tGSManufactureUploadVO);
            i++;
        }
    } catch (RuntimeException e) {
        LogWriter.error("****Manufacture BatchImport RuntimeEx :[" + e.getMessage() + "]");
        throw new GWException("导入数据中某一列数据类型不符合规定.");
    } catch (Error e) {
        LogWriter.error("****Manufacture BatchImport ErroeEx :[" + e.getMessage() + "]");
        throw new GWException(e.getMessage());
    } catch (Exception e) {
        LogWriter.error("****Manufacture BatchImport Ex :[" + e.getMessage() + "]");
        throw new GWException(e.getMessage());
    }
}
return i ;
}

//根据参数创建要下载的Excel文件
/**
* return 创建文件的路径
* 创建失败返回 "Error"
*/
/*
public static String createExcelByDownLoadInHead(DBConnection con,String serverPath,String tableName,String warehouseCode,String type,String lastupdatetime)
{
String strFilePath = "";
try{
    //根据参数查询数据
    Conditions cs = new Conditions();
    if (type.equals(ConstDefine.EXCELFILE_LOAD_TYPE_TIME))
    {
        String strDate = framework.core.DateUtil.formatToLongDateString(lastupdatetime, new framework.core.DateUtil().getFullString());
        cs.add(WarehouseCategory.LAST_UPDATE_TIME +">= ?",Conditions.CUSTOM,strDate);
    }
    ObjectList list = InHead.fetch().search(con, cs);            
    
    //Excel生成文件保存到指定位置
    try{    
        HSSFWorkbook tWb = new HSSFWorkbook();
        HSSFSheet tSheet = tWb.createSheet(tableName);
        HSSFRow tRow = null;
   
        //表头行
        tRow = tSheet.createRow((short)0);

        HSSFCell c1 = PoiUtil.createCell(tWb,tRow,(short)0,InHead.ID);
        HSSFCell c2 = PoiUtil.createCell(tWb,tRow,(short)1,InHead.IN_BILL_CODE);
        HSSFCell c3 = PoiUtil.createCell(tWb,tRow,(short)2,InHead.WAREHOUSE_CODE);
        HSSFCell c4 = PoiUtil.createCell(tWb,tRow,(short)3,InHead.WAREHOUSE_NAME);
        HSSFCell c5 = PoiUtil.createCell(tWb,tRow,(short)4,InHead.PROVIDER_CODE);
        HSSFCell c6 = PoiUtil.createCell(tWb,tRow,(short)5,InHead.PROVIDER_NAME);
        HSSFCell c7 = PoiUtil.createCell(tWb,tRow,(short)6,InHead.OTHER_WAREHOUSE_CODE);
        HSSFCell c8 = PoiUtil.createCell(tWb,tRow,(short)7,InHead.OTHER_WAREHOUSE_NAME);
        HSSFCell c9 = PoiUtil.createCell(tWb,tRow,(short)8,InHead.CREATE_TIME);
        HSSFCell c10 = PoiUtil.createCell(tWb,tRow,(short)9,InHead.IN_TYPE);
        HSSFCell c11 = PoiUtil.createCell(tWb,tRow,(short)10,InHead.IN_MONEY);
        HSSFCell c12 = PoiUtil.createCell(tWb,tRow,(short)11,InHead.SEND_BILL_CODE);
        HSSFCell c13 = PoiUtil.createCell(tWb,tRow,(short)12,InHead.REMARK);
        HSSFCell c14 = PoiUtil.createCell(tWb,tRow,(short)13,InHead.BALANCE_FLAG);
        HSSFCell c15 = PoiUtil.createCell(tWb,tRow,(short)14,InHead.BALANCE_USER_ID);
        HSSFCell c16 = PoiUtil.createCell(tWb,tRow,(short)15,InHead.BALANCE_USER);
        HSSFCell c17 = PoiUtil.createCell(tWb,tRow,(short)16,InHead.BALANCE_TIME);
        HSSFCell c18= PoiUtil.createCell(tWb,tRow,(short)17,InHead.STATUS);
        HSSFCell c19 = PoiUtil.createCell(tWb,tRow,(short)18,InHead.CREATE_USER_ID);
        HSSFCell c20 = PoiUtil.createCell(tWb,tRow,(short)19,InHead.CREATE_USER);
        HSSFCell c21 = PoiUtil.createCell(tWb,tRow,(short)20,InHead.CREATE_TIME);
        HSSFCell c22 = PoiUtil.createCell(tWb,tRow,(short)21,InHead.LAST_UPDATE_USER_ID);
        HSSFCell c23 = PoiUtil.createCell(tWb,tRow,(short)22,InHead.LAST_UPDATE_USER);
        HSSFCell c24 = PoiUtil.createCell(tWb,tRow,(short)23,InHead.LAST_UPDATE_TIME);
        HSSFCell c25 = PoiUtil.createCell(tWb,tRow,(short)24,InHead.IS_SYNC);

        short index = 0 ; //当前所在行号          
        short index_b = 3;
        for(int i=0;i<list.size();i++){
            InHead ih = (InHead)list.get(i);    
  
            //创建一行
            tRow = tSheet.createRow((short)(index+1));
            
            PoiUtil.createCell(tWb,tRow,(short)0,ih.getId() + "");
            PoiUtil.createCell(tWb,tRow,(short)1,ih.getInBillCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)2,ih.getWarehouseCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)3,ih.getWarehouseName() + "");
            PoiUtil.createCell(tWb,tRow,(short)4,ih.getProviderCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)5,ih.getProviderName() + "");
            PoiUtil.createCell(tWb,tRow,(short)6,ih.getOtherWarehouseCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)7,ih.getWarehouseName() + "");
            PoiUtil.createCell(tWb,tRow,(short)8,ih.getInTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)9,ih.getInType() + "");
            PoiUtil.createCell(tWb,tRow,(short)10,ih.getInMoney() + "");
            PoiUtil.createCell(tWb,tRow,(short)11,ih.getSendBillCode() + "");
            PoiUtil.createCell(tWb,tRow,(short)12,ih.getRemark() + "");
            PoiUtil.createCell(tWb,tRow,(short)13,ih.getBalanceFlag() + "");
            PoiUtil.createCell(tWb,tRow,(short)14,ih.getBalanceUserId() + "");
            PoiUtil.createCell(tWb,tRow,(short)15,ih.getBalanceUser() + "");
            PoiUtil.createCell(tWb,tRow,(short)16,ih.getBalanceTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)17,ih.getStatus() + "");
            PoiUtil.createCell(tWb,tRow,(short)18,ih.getCreateUserId() + "");
            PoiUtil.createCell(tWb,tRow,(short)19,ih.getCreateUser() + "");
            PoiUtil.createCell(tWb,tRow,(short)20,ih.getCreateTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)21,ih.getLastUpdateUserId() + "");
            PoiUtil.createCell(tWb,tRow,(short)22,ih.getLastUpdateUser() + "");
            PoiUtil.createCell(tWb,tRow,(short)23,ih.getLastUpdateTime() + "");
            PoiUtil.createCell(tWb,tRow,(short)24,ih.getIsSync() + "");


            index++;
        }
        String strTime = "";
        try{
            strTime = system.imp.DateUtil.getCurrTime();
        }
        catch(Exception e)
        {
        }
        
        String fileName;
        String filePath = serverPath + ConstDefine.EXCELFILE_SAVECREATEFILE_PATH;
        fileName ="download_" + strTime + "_" + tableName + ".xls";
        FileOutputStream fileOut = new FileOutputStream(filePath+fileName);
        tWb.write(fileOut);
        
        //返回下载路径
        strFilePath = ConstDefine.EXCELFILE_DOWNLOADCREATEFILE_PATH + fileName;
        
    }catch(Exception ex){
        strFilePath = ConstDefine.EXCELFILE_CREATE_ERROR;
    }
    
}
catch(Exception e)
{
    strFilePath = ConstDefine.EXCELFILE_CREATE_ERROR;
}


return strFilePath;
}
*/  
}

/* ExcelInoutToDB.java
*
* Project/Product: GW
*
* Modify Information:
* =============================================================================
*   Author Date       Description
*   ---------- ---------- ---------------------------------------------------
*   Administrator  2008-2-20   First release
*
* Licensed Materials - Property of APEP
* =============================================================================
*    (C) COPYRIGHT Shanghai Auto Mart E-Procurement Co., Ltd. 2007 - 2008
*    All Rights Reserved.
*
*    This software is the confidential and proprietary information of
*    Shanghai Auto Mart E-Procurement Co., Ltd. ("Confidential Information").
*    You shall not disclose such Confidential Information and shall use it only
*    in accordance with the terms of the license agreement you entered into 
*    with Shanghai Auto Mart E-Procurement Co., Ltd.
*
* Noties:
* =============================================================================
* 
*/




